package com.jg.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jg.model.dto.OrderQuery;
import com.jg.model.entity.PurchaseOrders;
import com.jg.model.vo.OrderVo;
import com.jg.model.vo.SupplierOrderGroupVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 采购订单表 记录采购订单信息 Mapper 接口
 * </p>
 *
 * @author 86130
 * @since 2025-09-19 11:21
 */
@Mapper
public interface PurchaseOrdersMapper extends BaseMapper<PurchaseOrders> {
    //订单查询
    Page<OrderVo> selectOrderList(Page page, @Param("orderQuery") OrderQuery orderQuery);
    //通过订单Id查询子订单
    List<OrderVo> selectChildOrdersByOrderId(@Param("orderId") String orderId);

    //供应商订单分组按月分组
    List<SupplierOrderGroupVo> supplierOrderGroupByMonth();

    List<OrderVo> queryOrderBySupplierIdAndMonth(String supplierId, String month);
}
